3.72 \(\int \frac{1}{1+\cos ^4(x)} \, dx\)

Optimal. Leaf size=292 \[ \frac{x}{2 \sqrt{\sqrt{2}-1}}+\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (2 \cot ^2(x)-2 \sqrt{\sqrt{2}-1} \cot (x)+\sqrt{2}\right )-\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (\sqrt{2} \cot ^2(x)+\sqrt{2 \left (\sqrt{2}-1\right )} \cot (x)+1\right )+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (1-2 \sin ^2(x)\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)+2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (2 \sin ^2(x)-1\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)-2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}} \]

[Out]

x/(2*Sqrt[-1 + Sqrt[2]]) + ArcTan[((-2 + Sqrt[2])*Cos[x]*Sin[x] + Sqrt[-1 + Sqrt[2]]*(1 - 2*Sin[x]^2))/(2 + Sq
rt[1 + Sqrt[2]] + 2*Sqrt[-1 + Sqrt[2]]*Cos[x]*Sin[x] + (-2 + Sqrt[2])*Sin[x]^2)]/(4*Sqrt[-1 + Sqrt[2]]) + ArcT
an[((-2 + Sqrt[2])*Cos[x]*Sin[x] + Sqrt[-1 + Sqrt[2]]*(-1 + 2*Sin[x]^2))/(2 + Sqrt[1 + Sqrt[2]] - 2*Sqrt[-1 +
Sqrt[2]]*Cos[x]*Sin[x] + (-2 + Sqrt[2])*Sin[x]^2)]/(4*Sqrt[-1 + Sqrt[2]]) + (Sqrt[-1 + Sqrt[2]]*Log[Sqrt[2] -
2*Sqrt[-1 + Sqrt[2]]*Cot[x] + 2*Cot[x]^2])/8 - (Sqrt[-1 + Sqrt[2]]*Log[1 + Sqrt[2*(-1 + Sqrt[2])]*Cot[x] + Sqr
t[2]*Cot[x]^2])/8

________________________________________________________________________________________

Rubi [A]  time = 0.19086, antiderivative size = 292, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {3209, 1169, 634, 618, 204, 628} \[ \frac{x}{2 \sqrt{\sqrt{2}-1}}+\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (2 \cot ^2(x)-2 \sqrt{\sqrt{2}-1} \cot (x)+\sqrt{2}\right )-\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (\sqrt{2} \cot ^2(x)+\sqrt{2 \left (\sqrt{2}-1\right )} \cot (x)+1\right )+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (1-2 \sin ^2(x)\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)+2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (2 \sin ^2(x)-1\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)-2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}} \]

Antiderivative was successfully verified.

[In]

Int[(1 + Cos[x]^4)^(-1),x]

[Out]

x/(2*Sqrt[-1 + Sqrt[2]]) + ArcTan[((-2 + Sqrt[2])*Cos[x]*Sin[x] + Sqrt[-1 + Sqrt[2]]*(1 - 2*Sin[x]^2))/(2 + Sq
rt[1 + Sqrt[2]] + 2*Sqrt[-1 + Sqrt[2]]*Cos[x]*Sin[x] + (-2 + Sqrt[2])*Sin[x]^2)]/(4*Sqrt[-1 + Sqrt[2]]) + ArcT
an[((-2 + Sqrt[2])*Cos[x]*Sin[x] + Sqrt[-1 + Sqrt[2]]*(-1 + 2*Sin[x]^2))/(2 + Sqrt[1 + Sqrt[2]] - 2*Sqrt[-1 +
Sqrt[2]]*Cos[x]*Sin[x] + (-2 + Sqrt[2])*Sin[x]^2)]/(4*Sqrt[-1 + Sqrt[2]]) + (Sqrt[-1 + Sqrt[2]]*Log[Sqrt[2] -
2*Sqrt[-1 + Sqrt[2]]*Cot[x] + 2*Cot[x]^2])/8 - (Sqrt[-1 + Sqrt[2]]*Log[1 + Sqrt[2*(-1 + Sqrt[2])]*Cot[x] + Sqr
t[2]*Cot[x]^2])/8

Rule 3209

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^4)^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dis
t[ff/f, Subst[Int[(a + 2*a*ff^2*x^2 + (a + b)*ff^4*x^4)^p/(1 + ff^2*x^2)^(2*p + 1), x], x, Tan[e + f*x]/ff], x
]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[p]

Rule 1169

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{1}{1+\cos ^4(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1+x^2}{1+2 x^2+2 x^4} \, dx,x,\cot (x)\right )\\ &=-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}-\left (1-\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )}{2 \sqrt{2 \left (-1+\sqrt{2}\right )}}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}+\left (1-\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )}{2 \sqrt{2 \left (-1+\sqrt{2}\right )}}\\ &=\frac{1}{8} \sqrt{-1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{-\sqrt{-1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )-\frac{1}{8} \sqrt{-1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )-\frac{1}{8} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )-\frac{1}{8} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )\\ &=\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{-1+\sqrt{2}} \cot (x)+2 \cot ^2(x)\right )-\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (1+\sqrt{2 \left (-1+\sqrt{2}\right )} \cot (x)+\sqrt{2} \cot ^2(x)\right )+\frac{1}{4} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{-1-\sqrt{2}-x^2} \, dx,x,-\sqrt{-1+\sqrt{2}}+2 \cot (x)\right )+\frac{1}{4} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{-1-\sqrt{2}-x^2} \, dx,x,\sqrt{-1+\sqrt{2}}+2 \cot (x)\right )\\ &=\frac{1}{2} \sqrt{1+\sqrt{2}} x-\frac{1}{4} \sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\left (2-\sqrt{2}\right ) \cos (x) \sin (x)-\sqrt{-1+\sqrt{2}} \left (1-2 \sin ^2(x)\right )}{2+\sqrt{1+\sqrt{2}}+2 \sqrt{-1+\sqrt{2}} \cos (x) \sin (x)-\left (2-\sqrt{2}\right ) \sin ^2(x)}\right )-\frac{1}{4} \sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\left (2-\sqrt{2}\right ) \cos (x) \sin (x)+\sqrt{-1+\sqrt{2}} \left (1-2 \sin ^2(x)\right )}{2+\sqrt{1+\sqrt{2}}-2 \sqrt{-1+\sqrt{2}} \cos (x) \sin (x)-\left (2-\sqrt{2}\right ) \sin ^2(x)}\right )+\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{-1+\sqrt{2}} \cot (x)+2 \cot ^2(x)\right )-\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (1+\sqrt{2 \left (-1+\sqrt{2}\right )} \cot (x)+\sqrt{2} \cot ^2(x)\right )\\ \end{align*}

Mathematica [C]  time = 0.0698497, size = 45, normalized size = 0.15 \[ \frac{\tan ^{-1}\left (\frac{\tan (x)}{\sqrt{1-i}}\right )}{2 \sqrt{1-i}}+\frac{\tan ^{-1}\left (\frac{\tan (x)}{\sqrt{1+i}}\right )}{2 \sqrt{1+i}} \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + Cos[x]^4)^(-1),x]

[Out]

ArcTan[Tan[x]/Sqrt[1 - I]]/(2*Sqrt[1 - I]) + ArcTan[Tan[x]/Sqrt[1 + I]]/(2*Sqrt[1 + I])

________________________________________________________________________________________

Maple [A]  time = 0.099, size = 227, normalized size = 0.8 \begin{align*}{\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}-\tan \left ( x \right ) \sqrt{-2+2\,\sqrt{2}}+\sqrt{2} \right ) }{16}}+{\frac{\sqrt{2}}{4\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) -\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) }+{\frac{1}{2\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) -\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) }-{\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+\tan \left ( x \right ) \sqrt{-2+2\,\sqrt{2}}+\sqrt{2} \right ) }{16}}+{\frac{\sqrt{2}}{4\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) +\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) }+{\frac{1}{2\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) +\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+cos(x)^4),x)

[Out]

1/16*2^(1/2)*(-2+2*2^(1/2))^(1/2)*ln(tan(x)^2-tan(x)*(-2+2*2^(1/2))^(1/2)+2^(1/2))+1/4/(2*2^(1/2)+2)^(1/2)*arc
tan((2*tan(x)-(-2+2*2^(1/2))^(1/2))/(2*2^(1/2)+2)^(1/2))*2^(1/2)+1/2/(2*2^(1/2)+2)^(1/2)*arctan((2*tan(x)-(-2+
2*2^(1/2))^(1/2))/(2*2^(1/2)+2)^(1/2))-1/16*2^(1/2)*(-2+2*2^(1/2))^(1/2)*ln(tan(x)^2+tan(x)*(-2+2*2^(1/2))^(1/
2)+2^(1/2))+1/4/(2*2^(1/2)+2)^(1/2)*arctan((2*tan(x)+(-2+2*2^(1/2))^(1/2))/(2*2^(1/2)+2)^(1/2))*2^(1/2)+1/2/(2
*2^(1/2)+2)^(1/2)*arctan((2*tan(x)+(-2+2*2^(1/2))^(1/2))/(2*2^(1/2)+2)^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\cos \left (x\right )^{4} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^4),x, algorithm="maxima")

[Out]

integrate(1/(cos(x)^4 + 1), x)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^4),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)**4),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\cos \left (x\right )^{4} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^4),x, algorithm="giac")

[Out]

integrate(1/(cos(x)^4 + 1), x)